<?php
namespace App\controllers;

use Core\annotations\Bean;
use Core\annotations\RequestMapping;
use Core\annotations\Value;
use Core\http\Request;
use Core\http\Response;


/**
 * @Bean(name="user")
 */
class UserController{

    /**
     * @Value(name="version")
     */
    public $version;
    /**
     * @RequestMapping(value="/test")
     */
    public function test(){
        return "abc1234567fffff";
    }
    /**
     * @RequestMapping(value="/user/{uid:\d+}")
     */
    public function user(Request $r,int $uid,Response $response){
      //  $response->writeHtml("你好");
        $response->redirect("http://www.jtthink.com");
         return ["userid"=>$uid,"username"=>"shenyi"];
    }


}